package user;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
@WebServlet(name = "healthInformationServlet",value = "/healthInformation")
public class healthInformationServlet extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException {
        String action1 = request.getParameter("action");
        switch (action1){
            case "addHealthInformation":
                request.getRequestDispatcher("/WEB-INF/user/addHealthInformation.jsp").forward(request,response);
                break;
            case "deleteInformation":
                request.getRequestDispatcher("/WEB-INF/user/deleteHealthInformation.jsp").forward(request,response);
                break;
            case "findHealthInformation":
                request.getRequestDispatcher("/WEB-INF/user/findHealthInformation.jsp").forward(request,response);
                break;
            case "findAllHealthInformation":
                request.getRequestDispatcher("/WEB-INF/user/findAllHealthInformation.jsp").forward(request,response);
                break;
        }
    }
}
